#include "dialog.h"
#include "ui_dialog.h"
#include<handle.h>

Dialog::Dialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::Dialog)
{
    ui->setupUi(this);
    this->sc=new myscene;
    this->ui->graphicsView->setScene(sc);
    this->score=0;
    handle* hand=handle::getinstance();
    connect(hand,SIGNAL(beat()),this,SLOT(updatescore()));
}

Dialog::~Dialog()
{
    delete ui;
}
void Dialog::updatescore(){
    this->score+=10;
    this->ui->lcdNumber->display(this->score);
}
void Dialog::paintEvent(QPaintEvent *event){
        QPixmap imgCursor(":/Images/Img/hit.png");
        QCursor cursor(imgCursor);
        setCursor(cursor);

}
